<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8" />
	<title>优惠信息</title>
	<meta http-equiv="Content-type" content="textml; charset=utf-8" />
	<meta content="telephone=no" name="format-detection" />
	<meta name="x5-orientation" content="portrait">
	<meta name="screen-orientation" content="portrait">
	<meta name="viewport"
		content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=yes">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<link rel="icon" href="data:;base64,=">
	<link rel="stylesheet" type="text/css" href="//img.ejiayou.com/activity/pages/ejiayoupay/ejiayou/css/reset.css" />
	<link rel="stylesheet" href="css/index.css" />
	<link rel="stylesheet" type="text/css" href="css/index_style.css" />

	<style type="text/css">
		.station_info_item label {
			position: absolute;
			right: 0.5rem;
			top: 0;
		}
	</style>
</head>

<body>
	<div id="app" v-cloak>
		<div class="load_end" v-if="!loadEnd"></div>
		<!--			<div class="tab_content">-->
		<!--				<div class="tab_item tab_active">-->
		<!--					<span>审核信息</span>-->
		<!--				</div>-->
		<!--				<div class="tab_item" @click="comeToExtraMsg">-->
		<!--					<span>补充信息</span>-->
		<!--				</div>-->
		<!--			</div>-->
		<div class="step_box">
			<img src="https://img.ejiayou.com/activity/jiguang_upload/img/step_active_four.png">
		</div>
		<div class="main_active">
			<van-form @submit="saveComeToNext">
				<van-cell value="长期优惠信息"></van-cell>
				<van-field readonly clickable v-model="discountTypeName" name="优惠类型" label="优惠类型"
					@click="showDiscountTypePicker" placeholder="优惠类型" right-icon="arrow"
					:rules="[{ required: true, message: '*请选择优惠类型' }]"></van-field>
				<van-popup v-model="show_discount_type_picker" position="bottom">
					<van-picker show-toolbar :columns="discountTypes" @confirm="discountTypeComfirm"
						@cancel="show_discount_type_picker = false"></van-picker>
				</van-popup>
				<van-field name="radio" label="优惠参考价">
					<template #input>
						<van-radio-group :disabled="look_gd?true:false" v-model="contrastType" direction="horizontal">
							<van-radio name="2" :disabled="discountType==2">
								国家价
								<template #icon="props">
									<img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
							<van-radio name="1">油站价
								<template #icon="props">
									<img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
						</van-radio-group>
					</template>
				</van-field>
				<van-field name="radio" label="优惠方式">
					<template #input>
						<van-radio-group :disabled="look_gd?true:false" v-model="discountMeans" direction="horizontal">
							<van-radio name="1">
								统一优惠
								<template #icon="props">
									<img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
							<van-radio name="2">区分用户
								<template #icon="props">
									<img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
						</van-radio-group>
					</template>
				</van-field>
				<p class="tips tips_con">*区分用户需要运营手动配置上线</p>
				<div v-if="discountMeans==1" class="prefer_setting_box"
					v-for="(prefer_item, prefer_index) in oilDiscount">
					<van-cell class="van_sub_title" :value="'结算信息-'+prefer_item.oilName"></van-cell>
					<div class="station_info_item">
						<van-field v-model="prefer_item.discountPrice" maxlength=5 type="number" name="优惠" label="优惠"
							placeholder="优惠" :rules="[{ validator: validator, message: '*请填写正确的优惠' }]"
							:readonly="look_gd?true:false"></van-field>
						<label v-if="discountType==1">元/升</label>
						<label v-if="discountType==2">折</label>
					</div>
					<div class="station_info_item">
						<van-field v-model="prefer_item.settle_price" name="结算价" label="结算价" placeholder="结算价"
							maxlength=5 readonly
							:rules="[{ validator: validator, message: '*请填写正确的结算价' }, { validator: settlePriceValidator, message: '*结算价不在合理区间，请检查' }]">
						</van-field>
						<label>元/升</label>
					</div>
					<p class="tips_con"
						v-if="discountMeans==1&&prefer_item.discount&&Number(prefer_item.settle_price)>Number(prefer_item.stationPrice)">
						*结算价不能大于油站价</p>
				</div>
				<van-field name="radio" class="van_field_margin" v-if="discountMeans==1" label="可动态定价">
					<template #input>
						<van-radio-group :disabled="look_gd?true:false" v-model="dynamicPrice" direction="horizontal">
							<van-radio name="1">
								是
								<template #icon="props">
									<img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
							<van-radio name="0">否
								<template #icon="props">
									<img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
						</van-radio-group>
					</template>
				</van-field>
				<!-- <van-field v-if="discountMeans==1" class="van_field_margin" readonly clickable v-model="commissionName" name="抽佣套餐"
					 label="抽佣套餐" @click="showCommissionPicker" placeholder="抽佣套餐" right-icon="arrow" :rules="[{ required: true, message: '*请选择抽佣套餐' }]"></van-field>
					<van-popup v-model="show_commission_picker" position="bottom">
						<van-picker show-toolbar :columns="commissions" @confirm="commissionComfirm" @cancel="show_commission_picker = false"></van-picker>
					</van-popup> -->
				<p class="tips tips_con" v-if="discountMeans==1">*不可动态定价需要手动配置上线</p>
				<!--					<van-field name="radio" class="van_field_margin" label="打印机">-->
				<!--						<template #input>-->
				<!--							<van-radio-group :disabled="look_gd?true:false" v-model="needPrinter" direction="horizontal">-->
				<!--								<van-radio name="1">-->
				<!--									需要-->
				<!--									<template #icon="props">-->
				<!--										<img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />-->
				<!--									</template>-->
				<!--								</van-radio>-->
				<!--								<van-radio name="0">不需要-->
				<!--									<template #icon="props">-->
				<!--										<img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />-->
				<!--									</template>-->
				<!--								</van-radio>-->
				<!--							</van-radio-group>-->
				<!--						</template>-->
				<!--					</van-field>-->
				<van-field v-model="insidePrinter" v-if="needPrinter==1" name="柜台机编号" label="柜台机编号" placeholder="柜台机编号"
					maxlength=5 :rules="[{ required: true, message: '*请填写柜台机编号' }]" :readonly="look_gd?true:false">
				</van-field>
				<p class="tips tips_con" v-if="needPrinter==1">*输入打印机编号后5位</p>

				<van-field name="radio" class="van_field_margin van_field_long_length" label="油站上线合作平台">
					<template #input>
						<van-radio-group :disabled="look_gd?true:false" v-model="isPlatform" direction="horizontal">
							<van-radio name="1">
								是
								<template #icon="props">
									<img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
							<van-radio name="0">否
								<template #icon="props">
									<img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
						</van-radio-group>
					</template>
				</van-field>
				<div class="station_info_item">
					<van-field v-model="stationFee" name="油站手续费" label="油站手续费" placeholder="油站手续费"
						:rules="[{ required: true, message: '*请填写手续费' }]" type="number" maxlength=5
						:readonly="look_gd?true:false"></van-field><label>%</label>
				</div>
				<p class="tips tips_con">*手续费率必须大于等于1%，否则将会走审批</p>
				<div class="station_info_item">
					<van-field v-model="stationFeeDay" name="银行服务费" label="银行服务费" readonly>
					</van-field><label>元 / 笔</label>
				</div>
				<p class="tips tips_con">*银行收取的转账费</p>
				<div class="submit_box_step">
					<van-button square type="primary" @click="rebackToLast" native-type="button">上一步</van-button>
					<van-button v-if="!look_gd&&!from_page" square type="primary" native-type="submit">保存并下一步
					</van-button>
					<van-button v-if="look_gd" square type="primary" native-type="button" @click="lookNextStep">查看下一步
					</van-button>
				</div>
				<div class="submit_box" v-if="from_page">

					<van-button square type="primary" native-type="button" @click="rebackUrl">关闭工单</van-button>
				</div>
			</van-form>
		</div>
	</div>
	<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
	<script src="https://img.ejiayou.com/activity/js/common/jquery.min.js" type="text/javascript"
		charset="utf-8"></script>
	<script src="js/vant.min.js"></script>
	<script src="js/utils.js" type="text/javascript" charset="utf-8"></script>

	<script src="js/area.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		eval(function (p, a, c, k, e, r) {
			e = function (c) {
				return c.toString(a)
			};
			if (!''.replace(/^/, String)) {
				while (c--) r[e(c)] = k[c] || e(c);
				k = [function (e) {
					return r[e]
				}];
				e = function () {
					return '\\w+'
				};
				c = 1
			};
			while (c--)
				if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
			return p
		}('(6(a,d){j b=a.i,e="3"f 5?"3":"9",c=6(){b.7.8=(2>b.4?b.4:2)/2*g+"h"};a.0&&(d.0(e,c,!1),a.0("k",c,!1))})(l,5);',
			22, 22,
			'addEventListener||750|orientationchange|clientWidth|window|function|style|fontSize|resize||||||in|64|px|documentElement|var|DOMContentLoaded|document'
				.split('|'), 0, {}))
	</script>
	<script>
		// console.log(area_list)
		var from_page = getQueryVariable('from_page') || ''
		var look_gd = getQueryVariable('look_gd') || ''
		var look_gd_text = getQueryVariable('look_gd_text') || ''
		var json_list = ''
		var admin_id = getQueryVariable('admin_id') || ''
		var work_order_id = getQueryVariable('work_order_id') || ''
		var order_type_id = getQueryVariable('order_type_id') || 1
		// 在 #app 标签下渲染一个按钮组件
		new Vue({
			el: '#app',
			data: {
				activityHost: (window.location.origin.indexOf("dev.ejiayou.com") != -1 ? window.location.origin : "//finance.ejiayou.com"),
				loadEnd: false,
				activeIcon: 'https://img.ejiayou.com/activity/jiguang_upload/img/active_icon.png',
				inactiveIcon: 'https://img.ejiayou.com/activity/jiguang_upload/img/inactive_icon.png',
				discountType: '1',
				discountTypeName: '',
				show_discount_type_picker: false,
				discountTypes: [{
					id: 1,
					text: "直降"
				},
				{
					id: 2,
					text: "折扣"
				}
				],
				contrastType: '2',
				discountMeans: '1',
				oilDiscount: [],
				commission: '',
				commissionName: '',
				commissions: [],
				show_commission_picker: false,
				needPrinter: '0',
				insidePrinter: '',
				isPlatform: '1',
				stationFee: '',
				look_gd: look_gd,
				look_gd_text: look_gd_text,
				work_order_id: work_order_id,
				order_type_id: order_type_id,
				admin_id: admin_id,
				title: '',
				dynamicPrice: 1,
				from_page: from_page,
				stationFeeDay: 1,
			},
			created() {
				var self = this

			},
			watch: {
				discountType: {
					handler: function (newVal, oldVal) {
						var self = this
						if (newVal == 2) {
							this.contrastType = '1'
						}
						self.oilDiscount.map(item => {
							for (var n = 0; n < json_list.oilInfo.length; n++) {
								if (json_list.oilInfo[n].oilId == item.oilId) {
									countryPrice = json_list.oilInfo[n].countryPrice
									stationPrice = json_list.oilInfo[n].stationPrice
								}

							}

							self.$set(item, 'stationPrice', stationPrice)
							if (self.discountMeans == 2) {

								self.$set(item, 'settle_price', countryPrice)
								return
							}
							if (newVal == 1) {
								if (self.contrastType == 2) {
									var discount = Number(countryPrice) - Number(item.discountPrice)
									var discount_aa = Number(discount.toString().replace(/([0-9]+.[0-9]{2})[0-9]*/, "$1"))

									item.discount = discount_aa
									item.settle_price = discount_aa
								} else {
									var discount = Number(stationPrice) - Number(item.discountPrice)
									var discount_aa = Number(discount.toString().replace(/([0-9]+.[0-9]{2})[0-9]*/, "$1"))

									item.discount = discount_aa
									item.settle_price = discount_aa
								}
							} else {
								if (self.contrastType == 2) {
									var discount = Number(countryPrice) * Number(item.discountPrice) * 0.1
									var discount_aa = Number(discount.toString().replace(/([0-9]+.[0-9]{2})[0-9]*/, "$1"))

									item.discount = discount_aa
									item.settle_price = discount_aa
								} else {
									var discount = Number(stationPrice) * Number(item.discountPrice) * 0.1
									var discount_aa = Number(discount.toString().replace(/([0-9]+.[0-9]{2})[0-9]*/, "$1"))

									item.discount = discount_aa
									item.settle_price = discount_aa
								}
							}
						})
					},
					deep: true
				},
				contrastType: {
					handler: function (newVal, oldVal) {
						var self = this

						self.oilDiscount.map(item => {
							for (var n = 0; n < json_list.oilInfo.length; n++) {
								if (json_list.oilInfo[n].oilId == item.oilId) {
									countryPrice = json_list.oilInfo[n].countryPrice
									stationPrice = json_list.oilInfo[n].stationPrice
								}

							}

							self.$set(item, 'stationPrice', stationPrice)
							if (self.discountMeans == 2) {
								self.$set(item, 'settle_price', countryPrice)
								return
							}
							if (self.discountType == 1) {
								if (newVal == 2) {
									var discount = Number(countryPrice) - Number(item.discountPrice)
									var discount_aa = Number(discount.toString().replace(/([0-9]+.[0-9]{2})[0-9]*/, "$1"))

									item.discount = discount_aa
									item.settle_price = discount_aa
								} else {
									var discount = Number(stationPrice) - Number(item.discountPrice)
									var discount_aa = Number(discount.toString().replace(/([0-9]+.[0-9]{2})[0-9]*/, "$1"))

									item.discount = discount_aa
									item.settle_price = discount_aa
								}
							} else {
								if (newVal == 2) {
									var discount = Number(countryPrice) * Number(item.discountPrice) * 0.1
									var discount_aa = Number(discount.toString().replace(/([0-9]+.[0-9]{2})[0-9]*/, "$1"))

									item.discount = discount_aa
									item.settle_price = discount_aa
								} else {
									var discount = Number(stationPrice) * Number(item.discountPrice) * 0.1
									var discount_aa = Number(discount.toString().replace(/([0-9]+.[0-9]{2})[0-9]*/, "$1"))

									item.discount = discount_aa
									item.settle_price = discount_aa
								}
							}
						})
					},
					deep: true
				},
				oilDiscount: {
					handler: function (newVal, oldVal) {
						var self = this

						var countryPrice = 0
						var stationPrice = 0
						//settle_price
						newVal.map(item => {
							for (var n = 0; n < json_list.oilInfo.length; n++) {
								if (json_list.oilInfo[n].oilId == item.oilId) {
									countryPrice = json_list.oilInfo[n].countryPrice
									stationPrice = json_list.oilInfo[n].stationPrice
								}

							}
							self.$set(item, 'stationPrice', stationPrice)
							if (self.discountMeans == 2) {
								self.$set(item, 'settle_price', countryPrice)
								return
							}
							if (self.discountType == 1) {
								if (self.contrastType == 2) {
									var discount = Number(countryPrice) - Number(item.discountPrice)
									// var discount_aa = Number(discount.toString().replace(/([0-9]+.[0-9]{2})[0-9]*/, "$1"))
									var discount_aa = Number(discount.toFixed(2))
									self.$set(item, 'settle_price', discount_aa.toFixed(2))
									self.$set(item, 'discount', discount_aa)
									console.log(discount, discount_aa)
								} else {

									var discount = Number(stationPrice) - Number(item.discountPrice)
									var discount_aa = Number(discount.toString().replace(/([0-9]+.[0-9]{2})[0-9]*/, "$1"))

									self.$set(item, 'settle_price', discount_aa.toFixed(2))
									self.$set(item, 'discount', discount_aa)
								}
							} else {
								if (self.contrastType == 2) {
									var discount = Number(countryPrice) * Number(item.discountPrice) * 0.1
									var discount_aa = Number(discount.toString().replace(/([0-9]+.[0-9]{2})[0-9]*/, "$1"))

									self.$set(item, 'settle_price', discount_aa.toFixed(2))
									self.$set(item, 'discount', discount_aa)
								} else {

									var discount = Number(stationPrice) * Number(item.discountPrice) * 0.1
									var discount_aa = Number(discount.toString().replace(/([0-9]+.[0-9]{2})[0-9]*/, "$1"))

									self.$set(item, 'settle_price', discount_aa.toFixed(2))
									self.$set(item, 'discount', discount_aa)
								}
							}
						})
						console.log(self.oilDiscount)
					},
					deep: true
				}
			},
			mounted: function () {
				var self = this
				this.getFormData(function () {
					var oilDiscount = []


					if (json_list && json_list.oilInfo && json_list.oilInfo.length > 0) {
						for (var i = 0; i < json_list.oilInfo.length; i++) {
							oilDiscount.push({
								oilName: json_list.oilInfo[i].name,
								oilId: json_list.oilInfo[i].oilId,
								discount: '',
								settle_price: '',
								discountPrice: 0
							})
						}
					}
					self.oilDiscount = json_list.oilDiscount || oilDiscount
					self.dynamicPrice = json_list.dynamicPrice || '1'
					self.discountType = json_list.discountType || '1'

					self.contrastType = json_list.contrastType || '2'
					self.discountMeans = json_list.discountMeans || '1'
					self.commission = json_list.commission || ''
					self.needPrinter = json_list.needPrinter || '0'
					self.insidePrinter = json_list.insidePrinter || '0'
					self.isPlatform = json_list.isPlatform || '1'
					self.stationFee = json_list.stationFee || ''
					if (self.discountType) {
						self.discountTypeName = self.discountTypes.find(function (element) {
							return element.id == self.discountType
						}).text
					}
					if (self.commission) {
						self.getCommission(function (commissions) {
							commissions.push({
								id: -1,
								text: '其他套餐'
							})
							self.commissions = commissions
							self.commissionName = self.commissions.find(function (element) {
								return element.id == self.commission
							}).text
						})

					} else {
						self.getCommission(function (commissions) {
							commissions.push({
								id: -1,
								text: '其他套餐'
							})
							self.commissions = commissions
							self.commissionName = self.commissions[0].text
							self.commission = self.commissions[0].id
						})
					}
					self.loadEnd = true
				})


			},
			methods: {
				rebackUrl: function () {
					history.back()
				},
				settlePriceValidator(val) {
					return val <= 2 ? false : true
				},
				validator: function (val) {
					console.log(val)
					return /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/.test(val);
				},
				getFormData: function (fn) {
					var self = this
					var data = {
						admin_id: this.admin_id,
						work_order_id: this.work_order_id
					}

					console.log(data);
					$.ajax({
						url: '/eapi/v1/activity/work/info?t=' + new Date().getTime(),
						data: data,

						type: 'get',
						dataType: 'json',
						success: function (res) {
							console.log(res)
							if (res.status == 200) {
								var resData = res.data
								self.title = resData.title
								json_list = JSON.parse(resData.content)
								if (fn) {
									fn()
								}
							}
						}
					})

				},
				createFormSave: function (json_list_data, fn) {
					var self = this
					var data = {
						order_type_id: this.order_type_id || 1,
						title: self.title,
						content: JSON.stringify(json_list_data),
						remark: '',
						admin_id: this.admin_id,
						work_order_id: this.work_order_id,
						is_exchange: 0
					}
					$.ajax({
						url: '/eapi/v1/activity/work/form_save',
						data: data,

						type: 'post',
						dataType: 'json',
						success: function (res) {
							console.log(res)
							if (res.status == 200) {
								var resData = res.data
								fn()
							}
						},
					})
				},

				getCommission: function (fn) {

					var self = this
					$.ajax({
						url: this.activityHost + '/cwxt/v3/config/station/commission',
						type: 'get',
						dataType: 'json',
						success: function (res) {
							console.log(res)
							if (res.success == true) {
								var resData = res.data
								// json_list = JSON.parse(resData.content)
								if (fn) {
									fn(resData.commission)
								}
							}
						}
					})
				},
				comeToExtraMsg: function () {
					var self = this
					location.href = 'extra_message.html?from_page=' + from_page + '&look_gd_text=' + this.look_gd_text + '&look_gd=' + this.look_gd +
						'&work_order_id=' + self.work_order_id + '&admin_id=' + self.admin_id + '&order_type_id=' + self.order_type_id
				},
				showDiscountTypePicker: function () {
					if (look_gd) {
						return
					}
					this.show_discount_type_picker = true
				},
				discountTypeComfirm: function (res) {
					console.log(res)
					this.discountType = res.id
					this.discountTypeName = res.text
					this.show_discount_type_picker = false
				},
				showCommissionPicker: function () {
					if (look_gd) {
						return
					}
					this.show_commission_picker = true
				},
				commissionComfirm: function (res) {
					this.commission = res.id
					this.commissionName = res.text
					this.show_commission_picker = false
				},
				rebackToLast: function () {
					location.replace(decodeURIComponent(getQueryVariable('reback_url')))
				},
				judgePrinter: function (fn) {

					var self = this
					$.ajax({
						url: this.activityHost + '/cwxt/v3/config/station/checkPrint?printCode=' + this.insidePrinter,
						type: 'get',
						dataType: 'json',
						success: function (res) {
							fn(res)
						}
					})
				},
				judgeOilPrice: function () {
					var a = 0
					for (var i = 0; i < this.oilDiscount.length; i++) {
						if (this.oilDiscount[i].stationPrice < this.oilDiscount[i].settle_price) {
							a = 1
						}
					}
					return a
				},

				saveComeToNext: function () {
					var self = this
					if (this.judgeOilPrice() && this.discountMeans == 1) {
						vant.Toast('请注意，结算价不能大于油站价')
						return
					}
					if (this.needPrinter == 0) {
						json_list.discountType = this.discountType
						json_list.discountTypeName = this.discountTypeName
						json_list.dynamicPrice = this.dynamicPrice
						json_list.contrastType = this.contrastType
						json_list.discountMeans = this.discountMeans
						json_list.oilDiscount = this.oilDiscount
						json_list.commission = this.commission
						json_list.commissionName = this.commissionName
						json_list.needPrinter = this.needPrinter
						json_list.insidePrinter = this.insidePrinter
						json_list.isPlatform = this.isPlatform
						json_list.stationFee = this.stationFee
						self.createFormSave(json_list, function () {
							location.replace('fifth_index.html?from_page=' + from_page + '&look_gd_text=' + this.look_gd_text + '&work_order_id=' + self.work_order_id +
								'&admin_id=' + self.admin_id + '&order_type_id=' + self.order_type_id + '&reback_url=' +
								encodeURIComponent(location.href))
						})
						return
					} else {
						this.judgePrinter(function (printerRes) {
							if (printerRes.success == true) {

								json_list.discountType = self.discountType
								json_list.discountTypeName = self.discountTypeName
								json_list.dynamicPrice = self.dynamicPrice
								json_list.contrastType = self.contrastType
								json_list.discountMeans = self.discountMeans
								json_list.oilDiscount = self.oilDiscount
								json_list.commission = self.commission
								json_list.commissionName = self.commissionName
								json_list.needPrinter = self.needPrinter
								json_list.insidePrinter = self.insidePrinter
								json_list.isPlatform = self.isPlatform
								json_list.stationFee = self.stationFee
								self.createFormSave(json_list, function () {
									location.replace('fifth_index.html?from_page=' + from_page + '&look_gd_text=' + this.look_gd_text + '&work_order_id=' + self.work_order_id +
										'&admin_id=' + self.admin_id + '&order_type_id=' + self.order_type_id + '&reback_url=' +
										encodeURIComponent(location.href))
								})
							} else {
								vant.Toast(printerRes.message || '打印机编号错误')
								return
							}
						})
					}


					// location.href = 'fifth_index.html'
				},
				lookNextStep: function () {
					var self = this
					location.replace('fifth_index.html?from_page=' + from_page + '&look_gd_text=' + this.look_gd_text + '&work_order_id=' + self.work_order_id +
						'&admin_id=' + self.admin_id + '&order_type_id=' + self.order_type_id + '&look_gd=' + look_gd +
						'&reback_url=' + encodeURIComponent(location.href))
					// location.href = 'fifth_index.html?
				}

			}
		});
		Vue.use(vant.Lazyload);
	</script>
</body>

</html>